mod district;
use crate::district::read_district_data;
use crate::district::count_provinces;
fn main() {
    // let provinces = district::count_provinces();
    // println!("provinces: {provinces}");

    // test_read_district_data();
    print!("{}",count_provinces());

}
fn test_read_district_data(){
    match read_district_data() {
        Ok(provinces) => {
            // 遍历每个批次及其对应的城市群数据
            for (batch_id, cities) in provinces {
                println!("Batch ID: {}", batch_id); // 输出批次编号
                for (city, neighbors) in cities {
                    println!("  City: {} -> Neighbors: {:?}", city, neighbors); // 按字母顺序输出城市和邻接城市
                }
                println!(); // 批次之间换行
            }
        }
        Err(e) => {
            eprintln!("Failed to read district data: {}", e);
        }
    }
}
